<?php
/**
 * Created by PhpStorm.
 * User: wangjiangtao
 * Date: 2021/10/27
 * Time: 11:47
 */

namespace App\Http\Model;

use Illuminate\Support\Facades\DB;

/**
 * 匹配-设置用户分数段
 */
class MeetRule extends Base
{
    /**
     * 表名字
     * @var string
     */
    protected $table = 'meet_rule';
    protected $primaryKey = 'id';

    public function __construct(array $attributes = [])
    {
        parent::__construct($this->table, $attributes);
    }

    public function updateRule($id, $data)
    {
        return DB::table($this->table)->where('id', $id)->update($data);
    }

    public function delRule($id)
    {
        return DB::table($this->table)->where('id', $id)->delete();
    }
}
